package com.topvision.jack.uploadlibrary.task;


import java.io.File;

/**
 * Created by wangjian on 15/11/21.
 */
public interface UploadTaskListener {

    /**
     * 上传中
     *
     * @param percent
     * @param uploadTask
     */
    void onUploading(UploadTask uploadTask, String percent, int position, String taskId);


    /**
     * 上传成功
     *
     * @param file
     * @param uploadTask
     */
    void onUploadSuccess(UploadTask uploadTask, File file, String taskId);

    /**
     * 上传失败
     *
     * @param uploadTask
     * @param errorCode  {@link UploadStatus}
     */
    void onError(UploadTask uploadTask, int errorCode, int position, String taskId);

    /**
     * 上传暂停
     *
     * @param uploadTask 任务
     * @param taskId     任务编号
     */
    void onPause(UploadTask uploadTask, String taskId);



}
